import requst from "@/utils/request";
//添加地址
export const addUserAddress = (data: object) => {
    return requst({
        url: '/client/address/add',
        method: 'post',
        data: data
    })
}
//获取用户全部地址
export const getUserAddressList = () => {
    return requst({
        url: '/client/address/list',
        method: 'get'
    })
}
//获取用户地址详细
export const getUserAddress = (id: any) => {
    return requst({
        url: `/client/address/${id}`,
        method: 'get'
    })
}
//修改用户地址
export const upUserAddress = (data: object) => {
    return requst({
        url: '/client/address/up',
        method: 'put',
        data: data
    })
}
//设置用户地址
export const setUserAddressDefault = (data: object) => {
    return requst({
        url: '/client/address/setDefault',
        method: 'put',
        data: data
    })
}
//删除用户地址
export const deleteUserAddress = (id: number) => {
    return requst({
        url: `/client/address/${id}`,
        method: 'delete'
    })
}